﻿using MangoMes.MVC.Commands;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace MangoMes.MVC.Controllers
{
    public class ProductionController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="ipAddressesConfig"></param>
        public ProductionController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        public IActionResult Index()
        {
            return View();
        }
        /// <summary>
        /// 生产报工列表+分页+条件查询
        /// </summary>
        /// <returns></returns>
        public IActionResult ProductionWorkSearch()
        {
            ViewBag.FoundationRead = _ipAddressesConfig.FoundationRead;
            ViewBag.FoundationWrite = _ipAddressesConfig.FoundationWrite;
            return View();
        }
        /// <summary>
        /// 生产报工修改
        /// </summary>
        /// <returns></returns>
        public IActionResult ProductionWorkUpdate()
        {
            ViewBag.FoundationRead = _ipAddressesConfig.FoundationRead;
            ViewBag.FoundationWrite = _ipAddressesConfig.FoundationWrite;
            return View();
        }
    }
}
